#!/bin/sh

input=/proc/rd
if [ "$1" != "" ]
then
input=$1
fi
output=/tmp/result.txt
if [ "$2" != "" ]
then
output=$2
fi

get_info()
{
echo "get_info_start"
for file in `find $input -name "*" -type f`
do
    echo "===Begin of $file==="
    cat $file
    echo "===End of $file==="
done
echo "get_info_end"
}

get_info > $output

